High-Efficiency Video Coding (HEVC) is a new international video coding standard developed by the Joint Collaborative Team on Video Coding (JCT-VC). HEVC is based on the hybrid block-based motion-compensated DCT-like transform coding architecture. The basic unit for compression, termed coding unit (CU), is a 2N×2N square block. A CU may begin with a largest CU (LCU), which is also referred as coded tree unit (CTU) in HEVC and each CU can be recursively split into four smaller CUs until the predefined minimum size is reached. Once the splitting of CU hierarchical tree is done, each CU is further split into one or more prediction units (PUs) according to prediction type and PU partition. Each CU or the residual of each CU is divided into a tree of transform units (TUs) to apply 2D transforms such as DCT (discrete cosine transform) or DST (discrete sine transform).
In High Efficiency Video Coding (HEVC), the generation of Intra prediction samples includes three parts: Intra smoothing filter, Intra prediction, and Intra gradient filter. A smoothing operation is first applied to the reference samples as a pre-processing step before calculating the prediction. This smoothing operation corresponds to applying an FIR-filter corresponding to [121]>>2. The smoothing operation corresponds to applying low-pass filter to the samples in the left column and the above row of the current TU (transform unit). The Intra prediction of each TU is produced with the reconstructed samples of neighboring TUs. The samples involved in Intra smoothing are highlighted with line-filled blocks in FIG. 1. Whether this smoothing operation is used depends on the TU size and the Intra prediction mode. The Intra prediction of current block is then derived from neighboring reference samples adjacent to boundaries of the current block as shown by line-filled blocks in FIG. 1 for certain Intra prediction modes. The Intra prediction modes according to HEVC include DC mode, planar mode, and 33 directional modes. An Intra prediction mode is selected for a current block by the encoder and is signaled in the bitstream. After the initial Intra prediction samples are generated, Intra gradient filter is further applied to the initial Intra prediction samples at the left column and top row within the current TU when the Intra prediction mode is DC, horizontal, or vertical mode.
The concept of Intra gradient filter is to utilize the gradient information along the Intra prediction direction to improve the quality of Intra prediction. The Intra gradient filter is further extended to other Intra prediction modes as described in JCTVC-G279 (Guo, et al., CE6 Subset d: Direction based Angular Intra Prediction, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, 7th Meeting: Geneva, CH, 21-30 Nov. 2011, Document: JCTVC-G279). For the 33 directional Intra prediction modes, the mode designation for various directions is shown in FIG. 2, where the mode designation is from h−7 through h+8 and from v−8 through v+8. For the Intra prediction modes from v to (v+8), Intra gradient filter is applied to selected Intra prediction samples. In the example of vertical Intra prediction mode (i.e., v), the Intra gradient filter is applied to the Intra prediction samples in the left column of the current block. Two boundary samples representing two reconstructed samples adjacent to the left column of the current block are located first for a current Intra prediction sample to be filtered. The gradient information is calculated based on the difference of the two boundary samples to improve the Intra prediction. FIG. 3 illustrates the example of Intra gradient filter for the vertical mode. Pij denotes the predictor at row i and column j. AL represents the reconstructed sample at the upper-left corner of the current block. Li represents the reconstructed sample adjacent to the left column of the current block. A new predictor is calculated according to:P′ij=Pij+α·(Li−AL),  (1)where α corresponds to the weighting factor and is a fractional number from 0 to 1 as determined according to j. For example, α=½ when j=0, and α=¼ when j=1. P′ij is used as the final predictor. Similarly, the Intra gradient filter is also applied to the horizontal Intra prediction mode. As for the Intra gradient filter of the horizontal directional mode, the final predictor P′ij is calculated according to:P′ij=Pij+α·(Aj−AL),  (2)where Aj is the reconstructed sample in the above row as shown in FIG. 3.
As for the directional modes from (v+1) to (v+8), the Intra gradient filter process will first identify a reference sample RLi along the direction of Intra prediction for a corresponding boundary sample Li. If RLi is not located at an integer pixel position, RLi can be generated by interpolation of integer pixels in the above boundary row. The Intra gradient filter is applied to Intra prediction samples in selected columns of the current Intra prediction mode. An example of gradient based prediction for directional mode from (v+1) to (v+8) is shown in FIG. 4. The final predictor P′ij is calculated according to:P′ij=Pij+α·(Li−RLi).  (3)
Similar to the vertical directional mode, α is a fractional number from 0 to 1 and is selected according to j.
Similar gradient based prediction is applied to directional modes from (h+1) to (h+8). A reference sample Raj in the boundary column adjacent to the left column of the current block along the direction of Intra prediction is determined for a corresponding boundary sample Aj first. If RAj is not located at an integer pixel position, RAj can be generated by interpolation of integer pixels in the left column. The final predictor P′ij is calculated according to:P′ij=Pij+α·(Aj−RAj),  (4)where α is a fractional number from 0 to 1 and is selected according to i.
For directional modes from v to (v+8) and from h to (h+8), the Intra gradient filter is applied to multiple Intra prediction columns or rows in the Intra prediction block. However, in HEVC, the Intra gradient filter is only applied to selected samples in the first row, first column or both the first row and first column of the Intra prediction block when the Intra prediction mode is DC, horizontal, or vertical mode. For example, if the Intra prediction is DC mode, the samples at the first row and first column are filtered by Intra gradient filter. If the Intra prediction is horizontal mode, then the samples at the first row are filtered by Intra gradient filter. If the Intra prediction is vertical mode, then the samples at the first column are further filtered by Intra gradient filter.
Besides Intra gradient filtering, another smoothing filter called bi-directional Intra prediction is also disclosed to improve the quality of Intra prediction in JCT-VC meetings, where bi-directional Intra prediction is also referred to as bi-boundary intra prediction. For directional Intra prediction modes (v+1) to (v+8) and (h+1) to (h+8), a weighted sum of a reconstructed sample in the above boundary row and a reconstructed samples in the left boundary column along the Intra prediction mode direction is used as the Intra predictor. An example of bi-directional Intra prediction for directional modes from (v+1) to (v+8) is shown in FIG. 5. For each Intra prediction sample Pij, a corresponding reference sample Fij in the left column along the prediction direction is identified. If Fij is not located at an integer pixel position, Fij is generated by interpolation of integer pixels in the left column. Then the final predictor P′ij is calculated as the weighted sum of Pij and Fij according to:P′ij=α·Pij+(1−α)·Fij,  (5)α is a fractional number from 0 to 1 and is selected according to the direction of Intra prediction and j for (v+1) to (v+8) directional modes.
For the directional modes (h+1) to (h+8), the bi-directional Intra prediction can be derived similarly. In this case, Fij corresponds to a reference sample in the above row. If Fij is not located at an integer pixel position, Fij is generated by interpolation of integer pixels in the above row. The final predictor P is calculated as the weighted sum of Pij and Fij according to equation (5), where a is a fractional number from 0 to 1 and is selected according to the direction of Intra prediction and i for (h+1) to (h+8) directional modes.
After generating Intra predictors, the prediction error is formed between a current block and its corresponding predictor. The prediction error is further processed by transform, quantization and entropy coding. For entropy coding, the quantized coefficients are divided into multiple 4×4 coefficient groups, first. The coding order of different coefficient groups and scan order of coefficients in one coefficient group is selected according to Intra prediction mode and transform size. If the transform size is smaller than or equal to 8×8, then intra-mode-dependent scan will be used for the coding order of different coefficient groups and scan order of coefficients in one coefficient group. Otherwise, diagonal scan is used for the coding order of different coefficient groups and scan order of coefficients in one coefficient group.
It is desirable to develop Intra prediction filter to further improve coding efficiency.